﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using University.Workshop.Presenters.OtbData.Read;

namespace University.Workshop.Presentation.OTBData.Read
{
    /// <summary>
    /// Interaction logic for PageSecondStepReadOtbData.xaml
    /// </summary>
    public partial class PageSecondStepReadOtbData : Page, ISecondStepForRead
    {
        PresenterReadOtbData pInternal;
        PresenterReadSecondStep pRegisterSecondStep;
        public PageSecondStepReadOtbData(PresenterReadOtbData pExternal)
        {
            InitializeComponent();
            this.pInternal = pExternal;
            pRegisterSecondStep = new PresenterReadSecondStep(this);
        }

        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            App.Current.MainWindow.Title = "Ver Persona";
        }

        #region Fields
        public string PersonId
        {
            set
            {
                CiLbl.Content = value;
            }
        }

        public string PersonNames
        {
            set
            {
                NamesLbl.Content = value;
            }
        }

        public string PersonLastNames
        {
            set
            {
                LastNamesLbl.Content = value;
            }
        }

        public List<string> PersonPhones
        {
            set {  PhoneLst.ItemsSource = value; }
        }
        #endregion

        public void UpdateViewData()
        {
            pRegisterSecondStep.UpdateViewData();
        }

        public void GoNextPage()
        {

        }

        public void GoBackPage()
        {
            pInternal.GoStepOne();
        }

        public Model.OtbData OtbDataToRead
        {
            get;
            set;
        }
    }
}
